package com.etc.datedemo;

import java.time.LocalDate;
import java.time.LocalDateTime;
import java.time.LocalTime;

/**
 * @author: knowno
 * @create: 2024-09-09 15:49
 * @Version 1.0
 **/
public class TestLocalDateTime {
    public static void main(String[] args) {

        LocalDateTime now = LocalDateTime.now();
        System.out.println(now); // now的toString方法

        //时间日期和 字符串转化
        String str= "2024-09-10T15:56:56";
        LocalDateTime parse = LocalDateTime.parse(str);
        System.out.println(parse);


    }
}
